home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Xt / XtResolvePathname.z / XtResolvePathname
Encoding:
Text File  |  1998-10-30  |  9.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXttttRRRReeeessssoooollllvvvveeeePPPPaaaatttthhhhnnnnaaaammmmeeee((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXttttRRRReeeessssoooollllvvvveeeePPPPaaaatttthhhhnnnnaaaammmmeeee((((3333XXXXtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XtResolvePathname - search for a file using standard
  10.           substitution
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           String XtResolvePathname(_d_i_s_p_l_a_y, _t_y_p_e, _f_i_l_e_n_a_m_e, _s_u_f_f_i_x,
  14.           _p_a_t_h, _s_u_b_s_t_i_t_u_t_i_o_n_s, _n_u_m__s_u_b_s_t_i_t_u_t_i_o_n_s, _p_r_e_d_i_c_a_t_e)
  15.                 Display *_d_i_s_p_l_a_y;
  16.                 String _t_y_p_e, _f_i_l_e_n_a_m_e, _s_u_f_f_i_x, _p_a_t_h;
  17.                 Substitution _s_u_b_s_t_i_t_u_t_i_o_n_s;
  18.                 Cardinal _n_u_m__s_u_b_s_t_i_t_u_t_i_o_n_s;
  19.                 XtFilePredicate _p_r_e_d_i_c_a_t_e;
  20.  
  21.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  22.           _d_i_s_p_l_a_y     Specifies the display to use to find the
  23.                       language for language substitutions.
  24.  
  25.           _t_y_p_e
  26.           _f_i_l_e_n_a_m_e
  27.           _s_u_f_f_i_x      Specify values to substitute into the path.
  28.  
  29.           _p_a_t_h        Specifies the list of file specifications, or
  30.                       NULL.
  31.  
  32.           _s_u_b_s_t_i_t_u_t_i_o_n_s
  33.                       Specifies a list of additional substitutions to
  34.                       make into the path, or NULL.
  35.  
  36.           _n_u_m__s_u_b_s_t_i_t_u_t_i_o_n_s
  37.                       Specifies the number of entries in
  38.                       _s_u_b_s_t_i_t_u_t_i_o_n_s.
  39.  
  40.           _p_r_e_d_i_c_a_t_e   Specifies a procedure called to judge each
  41.                       potential file name, or NULL.
  42.  
  43.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  44.           The substitutions specified by _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e are
  45.           determined from the value of the language string retrieved
  46.           by _X_t_D_i_s_p_l_a_y_I_n_i_t_i_a_l_i_z_e for the specified display.  To set
  47.           the language for all applications specify ``*xnlLanguage:
  48.           _l_a_n_g'' in the resource database. The format and content of
  49.           the language string are implementation-defined.   One
  50.           suggested syntax is to compose the language string of three
  51.           parts;  a  ``language  part'',  a ``territory  part'' and a
  52.           ``codeset part''.  The manner in which this composition is
  53.           accomplished is implementation-defined and the Intrinsics
  54.           make no interpretation of the parts other than to use them
  55.           in substitutions as described below.
  56.  
  57.           _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e calls _X_t_F_i_n_d_F_i_l_e with the following
  58.           substitutions in addition to any passed by the caller and
  59.           returns the value returned by _X_t_F_i_n_d_F_i_l_e:
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXttttRRRReeeessssoooollllvvvveeeePPPPaaaatttthhhhnnnnaaaammmmeeee((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXttttRRRReeeessssoooollllvvvveeeePPPPaaaatttthhhhnnnnaaaammmmeeee((((3333XXXXtttt))))
  71.  
  72.  
  73.  
  74.           %N   The value of the _f_i_l_e_n_a_m_e parameter, or the
  75.                application's class name if _f_i_l_e_n_a_m_e is NULL.
  76.  
  77.           %T   The value of the _t_y_p_e parameter.
  78.  
  79.           %S   The value of the _s_u_f_f_i_x parameter.
  80.  
  81.           %L   The language string associated with the specified
  82.                display.
  83.  
  84.           %l   The language part of the display's language string.
  85.  
  86.           %t   The territory part of the display's language string.
  87.  
  88.           %c   The codeset part of the display's language string.
  89.  
  90.           %C   The customization string retrieved from the resource
  91.                database associated with _d_i_s_p_l_a_y.
  92.  
  93.           %D   The value of the implementation-specific default path.
  94.  
  95.           If a path is passed to _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e, it will be passed
  96.           along to _X_t_F_i_n_d_F_i_l_e.  If the _p_a_t_h argument is NULL, the
  97.           value of the _X_F_I_L_E_S_E_A_R_C_H_P_A_T_H environment variable will be
  98.           passed to _X_t_F_i_n_d_F_i_l_e.  If _X_F_I_L_E_S_E_A_R_C_H_P_A_T_H is not defined, an
  99.           implementation-specific default path will be used which
  100.           contains at least 6 entries.  These entries must contain the
  101.           following substitutions:
  102.  
  103.           1. %C, %N, %S, %T, %L    or%C, %N, %S, %T, %l, %t, %c
  104.           2. %C, %N, %S, %T, %l
  105.           3. %C, %N, %S, %T
  106.           4. %N, %S, %T, %L   or   %N, %S, %T, %l, %t, %c
  107.           5. %N, %S, %T, %l
  108.           6. %N, %S, %T
  109.  
  110.           The order of these six entries within the path must be as
  111.           given above.  The order and use of substitutions within a
  112.           given entry is implementation dependent.  If the path begins
  113.           with a colon, it will be preceded by %N%S.  If the path
  114.           includes two adjacent colons, %%%%NNNN%%%%SSSS will be inserted between
  115.           them.
  116.  
  117.           The _t_y_p_e parameter is intended to be a category of files,
  118.           usually being translated into a directory in the pathname.
  119.           Possible values might include ``app-defaults'', ``help'',
  120.           and ``bitmap''.
  121.  
  122.           The _s_u_f_f_i_x parameter is intended to be appended to the file
  123.           name.  Possible values might include ``.txt'', ``.dat'', and
  124.           ``.bm''.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXttttRRRReeeessssoooollllvvvveeeePPPPaaaatttthhhhnnnnaaaammmmeeee((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXttttRRRReeeessssoooollllvvvveeeePPPPaaaatttthhhhnnnnaaaammmmeeee((((3333XXXXtttt))))
  137.  
  138.  
  139.  
  140.           A suggested value for the default path on POSIX-based
  141.           systems is
  142.  
  143.                <XRoot>/lib/X11/%L/%T/%N%C%S:<XRoot>/lib/X11/%l/%T/%N%C%S:\
  144.                <XRoot>/lib/X11/%T/%N%C%S:<XRoot>/lib/X11/%L/%T/%N%S:\
  145.                <XRoot>/lib/X11/%l/%T/%N%S:<XRoot>/lib/X11/%T/%N%S
  146.  
  147.           where <XRoot> is replaced by the root of the X11
  148.           installation tree (/usr/X11R6, for example).
  149.  
  150.           Using this example, if the user has specified a language, it
  151.           will be used as a subdirectory of <XRoot>/lib/X11 that will
  152.           be searched for other files.  If the desired file is not
  153.           found there, the lookup will be tried again using just the
  154.           language part of the specification.  If the file is not
  155.           there, it will be looked for in <XRoot>/lib/X11.  The _t_y_p_e
  156.           parameter is used as a subdirectory of the language
  157.           directory or of <XRoot>/lib/X11, and _s_u_f_f_i_x is appended to
  158.           the file name.
  159.  
  160.           The %D substitution allows the addition of path elements to
  161.           the implementation-specific default path, typically to allow
  162.           additional directories to be searched without preventing
  163.           resources in the system directories from being found.  For
  164.           example, a user installing resource files under a directory
  165.           called ``ourdir'' might set _X_F_I_L_E_S_E_A_R_C_H_P_A_T_H to
  166.  
  167.                %D:ourdir/%T/%N%C:ourdir/%T/%N
  168.  
  169.           The customization string is obtained by querying the
  170.           resource database currently associated with the display (the
  171.           database returned by _X_r_m_G_e_t_D_a_t_a_b_a_s_e) for the resource
  172.           _a_p_p_l_i_c_a_t_i_o_n__n_a_m_e.customization, class
  173.           _a_p_p_l_i_c_a_t_i_o_n__c_l_a_s_s.Customization where _a_p_p_l_i_c_a_t_i_o_n__n_a_m_e and
  174.           _a_p_p_l_i_c_a_t_i_o_n__c_l_a_s_s are the values returned by
  175.           _X_t_G_e_t_A_p_p_l_i_c_a_t_i_o_n_N_a_m_e_A_n_d_C_l_a_s_s.  If no value is specified in
  176.           the database, the empty string is used.
  177.  
  178.           It is the responsibility of the caller to free the returned
  179.           string using _X_t_F_r_e_e when it is no longer needed.
  180.  
  181.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  182.           _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s - _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  183.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.